/* 
 * File:   type.h
 * Author: tasx
 *
 * Created on 25 settembre 2011, 18.43
 */

#ifndef TYPE_H
#define	TYPE_H

#ifdef	__cplusplus
extern "C" {
#endif


#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <SDL/SDL_framerate.h>
#include <glib.h>


    typedef struct _event event;
    typedef struct _gui_manager gui_manager;
    typedef struct _string_manager string_manager;
    typedef struct _video_settings video_settings;
    typedef struct _settings settings;
    typedef struct _background_settings back_settings;
    typedef struct _time_update time_update;
    typedef struct _net_manager net_manager;
    typedef struct _main_obj main_obj;
    typedef FPSmanager fps_manager;

    struct _video_settings {
        int screen_width;
        int screen_height;
        int screen_bbp;
        int screen_flags;
        int fps;
    };

    struct _settings {
        video_settings *vs;
    };

    struct _background_settings {
        SDL_Surface *background;
        float speedx;
        float speedy;
        float posx;
        float posy;
        int tile_w;
        int tile_h;
        int mill_delay;
        int mill_elapsed;
    };

    struct _time_update {
        uint prev_time_updated;
        uint time_updated;
    };

    typedef struct _mouse_event {
        int x;
        int y;
        int mouse_button;
    } mouse_event;

    struct _event {
        mouse_event *me;
    };

    struct _gui_manager {
        TTF_Font *current_font;
        GList *elements;
        GList *buttons;
        gpointer focused_element;
        gpointer element_to_draw;
    };
    
    struct _string_manager {
        GHashTable *gt;
    };
    
    struct _net_manager
    {
        
    };
    
    struct _main_obj {
        SDL_Surface *main_screen;
        SDL_Surface *main_background;
        SDL_Event *event;
        back_settings *bs;
        settings *s;
        time_update *tu;
        gui_manager *gm;
        event *e;
        string_manager *sm;
        fps_manager *fm;
        net_manager *nm;
    };


#ifdef	__cplusplus
}
#endif

#endif	/* TYPE_H */

